home *** CD-ROM | disk | FTP | other *** search
- property pmin, pmax, pwidth, pMember, pSprite, ptracking, pDuration
- global gslide
-
- on beginSprite me
- pmin = sprite(gslide).left + 5
- pmax = sprite(gslide).right - 5
- pMember = sprite(me.spriteNum).member
- pSprite = sprite(me.spriteNum)
- ptracking = 0
- pwidth = pmax - pmin
- pDuration = sprite(26).duration
- end
-
- on exitFrame me
- if ptracking then
- pSprite.locH = max(min(the mouseH, pmax), pmin)
- else
- tPercent = float(sprite(26).currentTime) / pDuration
- pSprite.locH = pmin + integer(tPercent * pwidth)
- if pSprite.locH = pmax then
- pSprite.locH = pmin
- videoseek(sprite(26), 0)
- end if
- end if
- end
-
- on mouseDown me
- ptracking = 1
- end
-
- on mouseUp me
- refresh(me)
- end
-
- on mouseUpOutSide me
- refresh(me)
- end
-
- on refresh me
- ptracking = 0
- tPercent = (float(pSprite.locH) - pmin) / pwidth
- videoseek(sprite(26), integer(tPercent * pDuration))
- videoplay(sprite(26))
- end
-
- on getBehaviorDescription me
- return "¿Ã ýŠ¼©ÞŽÐÆ¥¬ Mpegþ´ŠÒ¿« ¡–«‡ªÛ¼¬Þ¶ Ž™¼ÞŽª¥¬ ýýðۿõ¿« " & RETURN & "þˆÐø° ¿¾øÎ ý¯¼µ¥œ¥Ÿ."
- end
-
- on getBehaviorTooltip me
- return "¿Ã ýŠ¼©ÞŽÐÆ¥¬ Mpegþ´ŠÒ¿« ¡–«‡ªÛ¼¬Þ¶ Ž™¼ÞŽª¥¬ ýýðۿõ¿« " & RETURN & "þˆÐø° ¿¾øÎ ý¯¼µ¥œ¥Ÿ."
- end
-